#pragma once

#include "PhiolDeviceManager.h"

namespace Phiol
{

/*
	RemoteDeviceManager
*/
class RemoteDeviceManager : public DeviceManager
{
public:
	RemoteDeviceManager( const std::string& serverID, const std::string& password );
	RemoteDeviceManager( const std::string& serverAddress, int port, const std::string& password );
	
	bool					openedUsingServerID() const		{ return mOpenedUsingServerID; }
	const std::string&		getPassword() const				{ return mPassword; }

	const std::string&		getServerID() const				{ return mServerID; }
	
	const std::string&		getServerAddress() const		{ return mServerAddress; }
	int						getPort() const					{ return mPort; }
	
	bool					isConnected() const;

protected:
	virtual void			openDevice( CPhidgetHandle phidgetHandle, int serialNumber );

private:
	bool					mOpenedUsingServerID;
	std::string				mPassword;

	std::string				mServerID;
	
	std::string				mServerAddress;
	int						mPort;
};

}